import { FC,useEffect } from 'react';
import { Form, Input} from 'antd';
import '../../static/css/newsAdd.css'
import { Upload, Button } from 'antd';
import { UploadOutlined } from '@ant-design/icons';

const NewsAdd: FC<any> = (props:any): JSX.Element => {
  
    useEffect(()=>{
    },[])

    return (
      <div>校园动态添加修改
         <Form.Item className="title" name="title" label="标题" rules={[{ required: true }]}>
             <Input></Input>
          </Form.Item>
          <Form.Item className="title" name="keywords" label="关键字" rules={[{ required: true }]}>
             <Input></Input>
          </Form.Item>
          <Form.Item className="title" name="author" label="作者" rules={[{ required: true }]}>
             <Input></Input>
          </Form.Item>
          <Form.Item
            name="intro"
            label="介绍"
            className="title"
            rules={[{ required: true, message: 'Please input Intro' }]}
          >
            <Input.TextArea/>
          </Form.Item>
          {/* 正文 */}
          <Form.Item name="author" label="正文" rules={[{ required: true }]}>
          <Upload {...props} >
            <Button className="uploading" icon={<UploadOutlined />}>upload</Button>
          </Upload>
          </Form.Item>
          <Form.Item>
            <Button className='butto' type="default" >重置</Button>
            <Button className='butto'  type="primary">确定</Button>
          </Form.Item>
      </div>
    )
}
export default NewsAdd;